import Vue from "vue";
import VueRouter, { RouteConfig } from "vue-router";
Vue.use(VueRouter);

//
import Tabs from "@/moduleC/views/tabs/index.vue";
import Home from "@/moduleC/views/tabs/home.vue";
import Transaction from "@/moduleC/views/tabs/transaction.vue";
import My from "@/moduleC/views/tabs/my.vue";
// 进件流程
import InfoVerify from "@/moduleC/views/collection/infoVerify.vue";
import MerchantsInfo from "@/moduleC/views/collection/merchantsInfo.vue";
// 支付页面
import Pay from "@/moduleC/views/pay/pay.vue";
import BillDetail from "@/moduleC/views/bill/billDetail.vue";
// 店员管理
import StaffHome from "@/moduleC/views/staffManager/staffHome.vue";
import StaffAdd from "@/moduleC/views/staffManager/staffAdd.vue";
// 我的费率
import MyRate from "@/moduleC/views/base/myRate.vue";
// 我要成为服务商
import AccountUpgrade from "@/moduleC/views/accountUpgrade/accountUpgrade.vue";

// 
import Bank from "@/module/router/bank";
import Login from "@/module/router/login";

const routes: Array<RouteConfig> = [
    {
        path: "/",
        redirect: "/tabs"
    },
    {
        path: "/tabs",
        name: "tabs",
        component: Tabs,
        children: [
            {
                path: "/tabs",
                redirect: "/tabs/home"
            },
            {
                path: "/tabs/home",
                name: "home",
                component: Home
            },
            {
                path: "/tabs/transaction",
                name: "transaction",
                component: Transaction
            },
            {
                path: "/tabs/my",
                name: "my",
                component: My
            }
        ]
    },
    {
        path: "/pay",
        name: "pay",
        component: Pay
    },
    {
        path: "/staffHome",
        name: "StaffHome",
        component: StaffHome
    },
    {
        path: "/staffAdd",
        name: "staffAdd",
        component: StaffAdd
    },
    // 信息采集
    {
        path: "/infoverify",
        name: "infoverify",
        component: InfoVerify
    },
    {
        path: "/merchantsInfo",
        name: "merchantsInfo",
        component: MerchantsInfo
    },
    // 我的费率
    {
        path: "/myRate",
        name: "myRate",
        component: MyRate
    },
    {
        path: "/accountUpgrade",
        name: "accountUpgrade",
        component: AccountUpgrade
    },
    {
        path: "/billDetail",
        name: "billDetail",
        component: BillDetail
    },
    ...Bank,
    ...Login
];

const router = new VueRouter({
    mode: "hash",
    base: process.env.BASE_URL,
    routes
});

export default router;
 